package com.xingchi.tornado.storage.core.model.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 文件分片信息校验DTO
 *
 * @author xingchi
 * @date 2025/3/16 22:53
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Schema(name = "FileChunkCheckDTO", description = "文件分片上传校验DTO")
public class FileChunkCheckDTO {

    @Schema(description = "文件sha256值")
    @NotNull(message = "文件hash值不能为空")
    @NotBlank(message = "文件hash值不能为空")
    private String sha256;

    @Schema(description = "文件分片序号")
    @NotNull(message = "当前文件分片序号不能为空")
    private Integer chunkNumber;

    @Schema(description = "文件分片总数")
    @NotNull(message = "文件总分片数不能为空")
    private Integer totalChunks;

}
